<div ng-controller="staffInfoCtrl">
	<div class="col-xs-12 col-md-12">
		<div class="widget">
			<div class="widget-header with-footer">
				<span class="widget-caption">员工信息表</span>
			</div>
			<div class="widget-body" style="height: auto;">
				<div class="flip-scroll">
              	<!-- <a style="float:right" id="editabledatatable_new" ng-click="addProviderBtn()" class="btn btn-default" style="margin-bottom:10px;">
                	<i class="fa fa-plus"></i>添加新的员工信息
                </a> -->
                <div class="form-group" style="width:240px;float:left;">
                  <span class="input-icon">
                      <input type="text"   class="form-control input " placeholder="按名字查询员工信息" ng-model="checkname" ng-keyup="keyupId()">
                      <i style="cursor:pointer"  class="glyphicon glyphicon-search darkorange" ng-click="findStaffByName(checkname)"></i>
                  </span>
             	</div>
             	<table class="table table-bordered table-striped table-condensed flip-content">
             		<thead class="flip-content bordered-darkorange">
             			<tr>
             				<th>姓名</th>
             				<th>性别</th>
             				<th>邮箱</th>
             				<th>出生年月</th>
             				<th>入职时间</th>
             				<th>手机号码</th>
             				<th class="numeric">操作</th>
             			</tr>
             		</thead>
             		<tbody>
									<tr ng-repeat="x in staff">
										<td>{{x.name}}</td>
	             			<td>{{x.gender}}</td>
	             			<td>{{x.email}}</td>
	             			<td>{{x.birth}}</td>
	             			<td>{{x.hiredate}}</td>
	             			<td>{{x.phone}}</td>
	             			<td class="numeric">
	             				<a class="btn btn-danger btn-xs delete" ng-click="delStaff(x.id)"><i class="fa fa-trash-o"></i> 删除</a>
	             			</td>
									</tr>
             		</tbody>
             	</table>
             	<div class="row DTTTFooter">
             		<div class="col-sm-6" style="margin-top: 20px;">
             			<div class="dataTables_info" id="simpledatatable_info" >
             				<span>共有{{recordsnum}}名员工信息</span>
             			</div>
             		</div>
             		<div class="col-sm-6 " style="margin-top: 10px;text-align:right;">
             			<div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
             				<!-- <ul class="pagination">
             					<li class="prev disabled"><a>上一页</a></li>
             					<li class="prev disabled"><a>1</a></li>
             					<li class="prev disabled"><a>2</a></li>
             					<li class="prev disabled"><a>下一页</a></li>
             				</ul> -->
										<pagination current-page="currentPage" total-page="totalPage" get-record="getRecord()">
            				</pagination>
             			</div>
             		</div>
             	</div>
                </div>
			</div>
		</div>
	</div>
	<!--删除框-->
	<div class="modal-preview"  ng-if="showModal">
    <div class="modal modal-primary">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" ng-click="delStaff()" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 class="modal-title">删除员工信息</h4>
          </div>
          <div class="modal-body">
            <p>确认删除此员工信息？请谨慎操作！</p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-warning" data-dismiss="modal" ng-click="delStaff()">取消</button>
            <button type="button" class="btn btn-primary" ng-click="sureDelStaff()">确认</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  	<!--添加弹框-->
	<div class="col-lg-5 col-sm-5 col-xs-11 update-model" ng-if="showAModel">
    <div class="widget">
        <div class="widget-header bordered-bottom bordered-darkorange">
            <span class="widget-caption">添加新的员工信息</span>
            <a style="float:right;line-height:33px;margin-right:12px;font-size:14px;" ng-click="addProviderBtn()">
                <i class="fa fa-times"></i>
            </a>
        </div>
        <div class="widget-body">
            <div id="horizontal-form">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">名称</label>
                        <div class="col-sm-6">
                            <input type="text"  class="form-control">
                        </div>
                        <label class="col-sm-2 control-label no-padding-right">性别</label>
                        <div class="col-sm-1">
                        <select>
						  <option value="male">男</option>
						  <option value="female">女</option>
						</select>
						</div>
                    </div>
                     <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">邮箱</label>
                        <div class="col-sm-10">
                            <input type="email"  class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">出生年月</label>
                        <div class="col-sm-10">
                            <input type="text"  class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">入职时间</label>
                        <div class="col-sm-10">
                            <input type="text"  class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">手机号码</label>
                        <div class="col-sm-10">
                            <input type="text"  class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" n class="btn btn-default">确认添加</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
  </div>

	<div class="mask" ng-class="showModal?'show':'noshow'"></div>

</div>



<script>
  $(function() {
    $( ".modal-preview" ).draggable();
  });
</script>
